package com.pktechan.api.dao;

import com.pktechan.api.base.BaseMapper;
import com.pktechan.api.entity.WxPayOrder;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository("wxPayOrderMapper")
public interface WxPayOrderMapper extends BaseMapper {
    /**
     * 根据传递给微信的支付流水号查询支付订单
     *
     * @param outTradeNo
     * @return
     */
    WxPayOrder getByOutTradeNo(String outTradeNo);

    /**
     * 根据交易状态查询支付订单
     *
     * @param tradeState
     * @return
     */
    List<WxPayOrder> getListByTradeState(String tradeState);

    /**
     * 根据微信支付订单号更新微信支付订单
     *
     * @param wxPayOrder
     */
    void updateByWxPayOutTradeNo(WxPayOrder wxPayOrder);
}
